package com.zy.web.demo.duoxiancheng.demo24;

import java.util.Date;

/**
 * @author <a href="mailto:zhouyong@cqyyt.com">zy</a>
 * @version 1.0
 * @date 2020/8/24 14:46
 */
public class ThreadLocalExt extends InheritableThreadLocal{

    @Override
    protected Object initialValue() {
        return this.zy;
    }

    private int zy;

    public ThreadLocalExt(int zy){
        this.zy = zy;
    }

    @Override
    protected Object childValue(Object parentValue) {
        return parentValue+"我在子线程加的";
    }
}
